package com.atfusu.base;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * Title:
 * Author: fusu
 * DateTime:  2022/11/25
 * Description:
 **/
public interface BaseDao<T> {

    /**
     * @return T
     * @Author: fusu
     * @Description: 根据id查找
     * @DateTime:20:54 2022/11/25
     * @params: [id]
     */
    T getById(Serializable id);


    /**
    *@Author: fusu
    *@Description: 添加一条数据
    *@DateTime:20:54 2022/11/25
    *@params: [t]
    *@return void
    */
    void insert(T t);

    /**
    *@Author: fusu
    *@Description: 根据id删除数据
    *@DateTime:20:55 2022/11/25
    *@params: [id]
    *@return void
    */
    void delete(Serializable id);

    /**
    *@Author: fusu
    *@Description: 修改数据
    *@DateTime:20:56 2022/11/25
    *@params: [t]
    *@return void
    */
    void update(T t);

    /**
    *@Author: fusu
    *@Description: 查询所有数据
    *@DateTime:20:56 2022/11/25
    *@params: []
    *@return java.util.List<T>
    */
    List<T> findAll();

    /**
    *@Author: fusu
    *@Description: 根据条件查找及分页功能
    *@DateTime:20:58 2022/11/25
    *@params: [filters]
    *@return java.util.List<T>
    */
    List<T> findPage(Map<String, Object> filters);
}
